{template top_set}
<script type="text/javascript">
$(function(){
	$("#dbTable tbody tr:even").addClass("trEven");
	$('#dbTable input[type="checkbox"]:checked').parents('tr').addClass('trSelected');
	$("#dbTable input[type='checkbox']").focus(function(){this.blur()});

	$("#dbTable tbody tr")
	.hover(function(){
//		$(this).addClass("trHover");
		this.style.backgroundColor="#fefedd";
	},function(){
//		$(this).removeClass("trHover");
		this.style.backgroundColor="";
	});
	$('.singleCheck').click(function(){
		if ($(this).attr('checked')) {
			$(this).parent().parent().addClass('trSelected');
			//$(this).find('input[type="checkbox"]').removeAttr('checked');
		} else {
			$(this).parent().parent().removeClass('trSelected');
			//$(this).find('input[type="checkbox"]').attr('checked','checked');
		}
	});
	$("#dbTable tbody tr .subheader").each(function (){
		$(this).click(function() {
			postId = $(this).attr('id').substring($(this).attr('id').indexOf('_')+1);
			showDetail(postId);
		});
	});
	$('#conditionDateFrom').datepicker({
		numberOfMonths: 1,
		showButtonPanel: true,
		startDate: '0',
		maxDate: new Date(),
		showOn: 'both',
		autoSize : true,
		buttonImage: 'themes/default/images/calendar.gif',
		buttonImageOnly: true,
		buttonText: '选择日期'
	});
	$('#conditionDateTo').datepicker({
		numberOfMonths: 1,
		showButtonPanel: true,
		startDate: '0',
		maxDate: new Date(),
		showOn: 'both',
		autoSize : true,
		buttonImage: 'themes/default/images/calendar.gif',
		buttonImageOnly: true,
		buttonText: '选择日期'
	});
})
function showDetail(postId) {
	$('#dbTable .layer_box2').each(function(){$(this).hide();});
	$('#detail_'+postId).show();
}
function hideDetail(postId) {
	$('#detail_'+postId).hide();
}
</script>
<ul class="set_nav">
    <li><a href="index.php?mod=message&act=manage&do=system_set">系统管理</a></li>
    <li><a href="index.php?mod=message&act=manage&do=theme_set">主题设置</a></li>
    <li><a href="index.php?mod=message&act=manage&do=account_set">管理员设置</a></li>
    <li><a href="index.php?mod=message&act=manage&do=message_set" class="select">留言管理</a></li>
</ul>
<div class="stage_content">
	<form method="post" action="index.php?mod=message&act=manage&do=message_set" name="filterForm" id="filterForm">
	<table width="800" border="0" class="tb_center" cellspacing="0" cellpadding="0">
		<tr>
			<td>
				<label for="showType">显示</label>
				<select id="showType" name="showType" onchange="$('#filterForm').submit()">
					<option value="message" <!--{if $showType=='message'}-->selected<!--{/if}-->>留言信息</option>
					<option value="admin_message" <!--{if $showType=='admin_message'}-->selected<!--{/if}-->>公告栏信息</option>
				</select>
			</td>
		</tr>
		<tr><td height="15"></td></tr>
		<tr>
			<td>
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td width="24%">
						<label for="conditionReply">筛选状态</label>
						<select id="conditionReply" name="conditionReply" <!--{if $showType=='admin_message'}-->disabled<!--{/if}-->>
							<option value="">全部</option>
							<!--{if $showType!='admin_message'}-->
							<option value="replyed" <!--{if $conditionReply=='replyed'}-->selected<!--{/if}-->>管理员已回复</option>
							<option value="unreplyed" <!--{if $conditionReply=='unreplyed'}-->selected<!--{/if}-->>管理员未回复</option>
							<!--{/if}-->
						</select>
					</td>
	
					<td width="16%">从
						<input type="text" id="conditionDateFrom" name="conditionDateFrom" class="input_66" value="{$conditionDateFrom}"/>
					</td>
					<td width="19%">到
						<input type="text" id="conditionDateTo" name="conditionDateTo" class="input_66" value="{$conditionDateTo}"/>
					</td>
					<td width="9%" valign="middle">
						<label for="conditionKeyword">关键字筛选 </label>
					</td>
					<td width="15%" align="left" valign="middle"><input type="text" class="input_100" id="conditionKeyword" name="conditionKeyword" value="{$conditionKeyword}"/></td>
					<td width="8%"><input type="submit" class="btn_style1" value="筛选" /></td>
					<td width="10%" align="right"><input type="button" class="btn_style1 vertical" onclick="jumpto('index.php?mod=message&act=manage&do=message_set')" value="显示全部" /></td>
				</tr>
				</table>
			</td>
		</tr>
		<tr>
	    <td height="15"></td>
	    </tr>
		<tr>
			<td>
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td width="73%"><input type="button" class="btn_style1" value="删除" onclick="massDel();"/></td>
						<td width="27%">
							<label for="conditionOrder">排序方式</label>
							<select id="conditionOrder" name="conditionOrder" onchange="$('#filterForm').submit()">
								<option value="time_desc" <!--{if $conditionOrder=='time_desc'}-->selected<!--{/if}-->>按时间从远到近</option>
						       	<option value="time_asc" <!--{if $conditionOrder=='time_asc'}-->selected<!--{/if}-->>按时间从近到远</option>
							</select>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
	<input id="pageNum" type="hidden" value="{$pageNum}" />
	<table cellspacing="0" id="dbTable" class="comm_tbstyle">
		 <thead>
		  <tr>
		   <th width="30" class="No"><input type="checkbox" id="massCheck"/></th>
		   <th width="448">信息</th>
		   <th width="120">添加时间</th>
		   <th width="94">IP</th>
		   <th width="94" colspan="2">状态</th>
		   </tr>
		 </thead>
		 <tbody>
		<!--{loop $_pagelist $k $p}-->
		<tr id="mess_{$p['id']}">
			<td class="No"><input type="checkbox" class="singleCheck" value="{$p['id']}" /></td>
			<td>
				<!-- comm_tip -->
				<div class="layer_box2" id="detail_{$p['id']}" style="margin:25px 0 0 100px;_margin:22px 0 0 100px;width:365px;display:none;position:absolute;">
					<a href="" class="closed" onclick="return false;">close</a>
				    <div class="comm_content">
				    	<p>{$p['content']}</p>
				    	<div class="line"></div>
				    	{$p['reply']}
				        <div class="source"><!--{if $showType != 'admin_message'}--><a href="" onclick="showBackendCommentBox({$p['id']});return false;">回复</a><!--{/if}--><a href="" onClick="delPost({$p['id']});return false;" class="noborder">删除</a>
				    	</div><div class="clear"></div>
				    	<div class="comment" id="comment_box_{$p['id']}" style="display:none;">
	                           <a href="" class="closed_3" onclick="hideBackendCommentBox({$p['id']});return false;">close</a> 
	                               <div class="comment_text">
	                                   <textarea class="textarea_380" cols="" name="" rows="" id="commentArea_{$p['id']}"></textarea>
	                                   <!-- <a class="faces left" href="" onclick="showFace(this,'commentArea_{$p['id']}',-20,30);return false;">表情</a> -->
	                                   <div class="right"><input type="button" class="stage_btn" onclick="commentBackend({$p['id']})" value="提交"></div>
	                               </div>
	                           <div class="clear"></div>
	                       </div>
				    </div>
					<div class="layer_pointer2">&nbsp;</div>
				</div>
				<!--comm_tip end-->
				<span class="subheader" id="subheader_{$p['id']}" style="display:block;width:100%">{$p['subheader']}</span>
			</td>
			<td><!--{eval echo date("Y-m-d H:i",$p["createtime"])}--></td>
			<td>{$p['ip']}</td>
			<td colspan="2"><!--{if $p['ispower']}-->悄悄话<!--{else}-->公开<!--{/if}--></td>
		</tr>
		<!--{/loop}-->
		</tbody>
	</table>
	<table width="800" border="0" class="tb_center" cellspacing="0" cellpadding="0">
		<tr>
			<td>
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td width="73%"><input type="button" class="btn_style1" value="删除" onclick="massDel();"/></td>
						<td width="27%">
							<label for="conditionOrder">排序方式</label>
							<select id="conditionOrder" name="conditionOrder" onchange="$('#filterForm').submit()">
								<option value="time_desc" <!--{if $conditionOrder=='time_desc'}-->selected<!--{/if}-->>按时间从远到近</option>
						       	<option value="time_asc" <!--{if $conditionOrder=='time_asc'}-->selected<!--{/if}-->>按时间从近到远</option>
							</select>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
	<input id="pageNum" name="pageNum" type="hidden" value="{$pageNum}" />
</form>
<!--{if $_pagelist}-->
	<!--pagenav-->
	<div class="pagenav">
		{$pagestr}
		<!--<a title="末页" href="#">首页<em class="pagenumber">&lt;&lt;</em></a><em class="pagenumber"><span class="extend">...</span><a href="#">&lt;&lt;</a><a title="2" href="#">2&nbsp;|</a><a title="3" href="#">3&nbsp;|</a><span class="current">4&nbsp;|&nbsp;</span><a title="5" href="#">5&nbsp;|</a><a title="6" href="#">6&nbsp;|</a><a href="#">&gt;&gt;</a><span class="extend">...</span></em><a title="末页" href="#">末页<em class="pagenumber">&gt;&gt;</em></a><span class="pages">&nbsp;4/7&nbsp;|&nbsp;共17页</span>-->
	</div>
	<!--pagenav-->
<!--{/if}-->
<!-- face -->
<!--
<div id="faceBox" class="layer_box">
	<a href="" class="closed" onclick="return false;">close</a>
	<ul class="faces_icons">
		<!--{loop $faces $key=>$face}-->
		<li><a href="" title="{$key}" value="[{$key}]" onclick="return false;"><img src="{$face}" alt="{$key}"/></a></li>
		<!--{/loop}-->
	</ul>
	<div class="clear"></div>
	<div class="layer_pointer">&nbsp;</div>
</div> 
-->
<!-- face -->
</div>
{template foot_set}